﻿@{
    var userName = ViewData["LoginUserName"] as string;
    var loginPath = "/" + ViewContext.RouteData.Values["controller"].ToString() + "/" + ViewContext.RouteData.Values["action"].ToString();

    <link rel="stylesheet" href="~/css/site.css" />
}

@if (String.IsNullOrEmpty(userName))
{
    <a class="nav-link text-dark" asp-area="" asp-controller="ApplicationUser" asp-action="Create">快速注册</a>
    <a class="nav-link text-dark" asp-area="" asp-controller="Account" asp-action="Login">请登录</a>
}
else
{
    <a href="#" data-toggle="dropdown" class="nav-link dropdown-toggle nav-link-lg nav-link-user">
        <img alt="image" src="@ViewData["LoginUserAvatarPath"]" class="rounded-circle mr-1" style="width:50px;">
        <div class="d-sm-none d-lg-inline-block">@ViewData["LoginUserDisplayName"]</div>
    </a>
    <!-- 待处理 -->
<div class="dropdown-menu dropdown-menu-right">
    <a href="/PersonCentrel/Update" class="dropdown-item has-icon">
        <i class="far fa-user"></i> 编辑资料
    </a>
    <a href="/PersonCentrel/Index" class="dropdown-item has-icon">
        <i class="far fa-user"></i> 我的头像
    </a>
    <a href="/Mission/Index" class="dropdown-item has-icon">
        <i class="fas fa-cog"></i> 任务管理
    </a>
    <a href="/Profile/Settings" class="dropdown-item has-icon">
        <i class="fas fa-cog"></i> 个人设置
    </a>
    <a href="/Account/ForgetPwd" class="dropdown-item has-icon">
        <i class="fas fa-cog"></i> 修改密码
    </a>
    <a href="/Account/RemoveUser" class="dropdown-item has-icon">
        <i class="fas fa-cog"></i> 账号注销
    </a>
    <div class="dropdown-divider"></div>
    <a href="/Account/Logout" class="dropdown-item has-icon text-danger">
        <i class="fas fa-sign-out-alt"></i> 退出登录
    </a>
</div>
}
